<template>
  <!-- 内勤管理 -->
  <EditTab></EditTab>
  <OfficialsTab></OfficialsTab>
  <UserTable :key="'index'+data.length"  :tabdata="data"></UserTable>
</template>

<script setup lang="ts">
import UserTable from '../../components/UserTable.vue'
import EditTab from '../../components/EditTab.vue'
import OfficialsTab from '../../components/OfficialsTab.vue'
import link from '@/util/api';    
import { onBeforeMount, ref, watch } from 'vue';
let data:any = ref([])
const getMSG=()=>{
  link('/getWorkers').then( (res: any) => {
  data.value =  res.data.filter((res:any)=> res.categary==="内部工作人员" )
})
}
onBeforeMount(() => {
  getMSG()
})
watch(data.value,getMSG)
</script>

<style scoped lang="scss">

</style>